load("//tools:defaults.bzl", "jasmine_test", "ts_project")

ts_project(
    name = "ngtsc_lib",
    testonly = True,
    srcs = glob(["**/*.ts"]),
    deps = [
        "//:node_modules/esbuild",
        "//:node_modules/source-map",
        "//:node_modules/typescript",
        "//packages/compiler",
        "//packages/compiler-cli",
        "//packages/compiler-cli/src/ngtsc/core:api",
        "//packages/compiler-cli/src/ngtsc/diagnostics",
        "//packages/compiler-cli/src/ngtsc/docs",
        "//packages/compiler-cli/src/ngtsc/file_system",
        "//packages/compiler-cli/src/ngtsc/file_system/testing",
        "//packages/compiler-cli/src/ngtsc/indexer",
        "//packages/compiler-cli/src/ngtsc/reflection",
        "//packages/compiler-cli/src/ngtsc/testing",
        "//packages/compiler-cli/src/ngtsc/typecheck/api",
        "//packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box",
        "//packages/compiler-cli/src/ngtsc/util",
        "//packages/compiler-cli/test:test_utils",
    ],
)

jasmine_test(
    name = "ngtsc",
    timeout = "long",
    data = [
        ":ngtsc_lib",
        "//:node_modules/yargs",
        "//packages/compiler-cli/src/ngtsc/testing/fake_common:npm_package",
        "//packages/core:npm_package",
        "//packages/forms:npm_package",
    ],
    shard_count = 4,
)
